package com;

import com.model.AcmeProperties3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 软注入的第一种方式：autowired方式
 */
@RestController
@EnableConfigurationProperties(AcmeProperties3.class)
public class EnabelAcme3AutoWController {

    @Autowired
    private AcmeProperties3 acmeProperties3;

    @RequestMapping("acme3")
    public String acme3() {
        return this.acmeProperties3.toString();
    }
}
